
public class StringBufEx1 {
	public static void main(String[] args) {
		StringBuffer sb = new StringBuffer("hello");
		
		System.out.println("capacity : " + sb.capacity());
		System.out.println("length : " + sb.length());
		
		String a = new String("Hello");
		a = a + "hi";
		
		StringBuffer b = new StringBuffer("hello");
		b.append("hi");
		
		String ss = b.toString();
		
		System.out.println(a);
		System.out.println(b);
		System.out.println(ss);
		
	}

}
